package com.spica.spicaschool.persistence.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.spica.spicaschool.bean.diary.Diary

@Dao
interface DiaryDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insert(diaries: List<Diary>)


    @Query("SELECT * FROM diary")
    suspend fun queryAll(): List<Diary>


    @Query("DELETE  FROM diary")
    suspend fun deleteAll()

}